package cn.zhangchg.meituan;

import com.alibaba.fastjson.JSON;

import java.util.List;
import java.util.Random;
import java.util.stream.Collectors;

public class CService {
    /**
     * 获取联系人信息
     * @param poiIds
     * @return
     */
    public List<Contact> batchGetContactBypoiIds(List<Long> poiIds){
        List<Contact> list;
        Random random = new Random();
        list = poiIds.stream().map(poiId -> new Contact(poiId, Long.toString(random.nextLong()))).collect(Collectors.toList());
        System.out.println(JSON.toJSONString(list));
        return list;
    }
    /**
     * 获取随机数
     * @return
     */
    public int get(){
        Random random = new Random();
        return random.nextInt(10) + 1;
    }
}
